package com.wt.admin.controller.ai;


import com.aizuda.easy.security.domain.Rep;
import com.aizuda.easy.security.domain.Req;
import com.wt.admin.domain.dto.ai.MCPDTO;
import com.wt.admin.domain.vo.ai.MCPVO;
import com.wt.admin.domain.vo.sys.UserVO;
import com.wt.admin.service.ai.MCPService;
import com.wt.admin.util.PageUtil;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("mcp")
public class MCPController {

    @Resource
    private MCPService mcpService;

    @PostMapping("list")
    public Rep<PageUtil.PageVO<MCPVO>> list(@RequestBody Req<PageUtil.PageDTO<MCPDTO>, UserVO> req) {
        return Rep.ok(mcpService.list(req.getData()));
    }

    @PostMapping("edit")
    public Rep<MCPVO> edit(@RequestBody Req<MCPDTO, UserVO> req) {
        return Rep.ok(mcpService.edit(req.getData()));
    }

    @PostMapping("del")
    public Rep<MCPVO> del(@RequestBody Req<MCPDTO, UserVO> req) {
        return Rep.ok(mcpService.del(req.getData()));
    }


}
